*Replication Instructions for

*Explaining Partisan Gaps in Satisfaction with Democracy after Contentious Elections: Evidence from a U.S. 2020 Election Panel Survey

*Sam Whitt , Alixandra B. Yanus , Mark Setzler , Brian McDonald ,John Graeber , Gordon Ballingrud , Martin Kifer 

*Department of Political Science
*High Point University
*One University Parkway
*High Point, NC 27268


*Below are instructions for replicating all manuscript and online appendix tables and figures in STATA using the long format of the dataset 
*“PS 2020 Election Panel Replication Data_long format_finalversion” 

*Manuscript Text

*“Data were collected between October 27-November 1st for the pre-election survey and November 10-23rd for the post-election study.” 

tab date if wave==1
tab date if wave==2

*“A total of 1564 completed the study (955 total in wave 1 and 609 in wave 2), of which 504 completed both the pre- and post-election waves.”

tab wave
 
*“Among Democrats, 55.0% were somewhat or very satisfied before the election and this proportion increased to 66.8% after the election, while Republican satisfaction with democracy fell from 66.0% to 56.7.3% after the election. In contrast, independents, whose satisfaction with democracy is lower than either Democrats and Republicans (43.5% before, 43.9% after the election), did not change following the election.”

tab demqual if partyid==1 & panel==1 & wave==1
tab demqual if partyid==1 & panel==1 & wave==2
tab demqual if partyid==2 & panel==1 & wave==1
tab demqual if partyid==2 & panel==1 & wave==2
tab demqual if partyid==3 & panel==1 & wave==1
tab demqual if partyid==3 & panel==1 & wave==2

*Manuscript Figure 2a (use wide-format dataset)

*Manuscript Figure 2b 

graph twoway (histogram revdemqual if democrat==1 & panel==1, by(wave) discrete percent ytitle("Percent") xlabel(1 "not at all satisfied" 2 "not very satisfied" 3 "somewhat satisfied" 4 "very satisfied") xscale(range(1(1)4)) legend(order(1 2) label(1 "Pre-Election") label(2 "Post-Election")))(histogram revdemqual if republican==1 & panel==1, by(wave) discrete percent fcolor(none))

*Note additional formating requires the "Figure 2b formatting.grec" file with the command graph play "Figure 2b formatting.grec"

*Table 1 (use wide-format dataset)

*Table 2 (use wide-format dataset)

*Figure 3. See supplementary appendix and file in excel “MS. Figure 3” in “Elections and Democracy All Excel Files.xls”


*Online Appendix

*Use Long-Format Dataset for replication Unless otherwise instructed 

*Means and Frequency Distributions on Key Variables in the Manuscript - See Excel File

*Figure. Changes in Satisfaction with Democracy (Pre/Post-Election)

*note: may require installation of cibar package from http://fmwww.bc.edu/RePEc/bocode/c

ssc install cibar

cibar revdemqual if partyid<4 & panel==1, over1(wave) over2(partyid) graphopts(title("Changes in Satisfaction with Democracy (Pre/Post Election)", size(medium)) ytitle("mean democracy satisfaction") legend(order(1 2) label(1 "Pre-Election") label(2 "Post-Election")))

*Satisfaction with Democracy – Democrats, Republicans, Independents

graph twoway (histogram revdemqual if democrat==1 & panel==1, by(wave) discrete percent ytitle("Percent") xlabel(1 "not at all satisfied" 2 "not very satisfied" 3 "somewhat satisfied" 4 "very satisfied") xscale(range(1(1)4)))

*Note additional formatting requires the "SA Figure Satisfaction with Democracy-Democrats.grec" file with the command graph play "SA Figure Satisfaction with Democracy-Democrats.grec"

graph twoway (histogram revdemqual if republican==1 & panel==1, by(wave) discrete percent ytitle("Percent") xlabel(1 "not at all satisfied" 2 "not very satisfied" 3 "somewhat satisfied" 4 "very satisfied") xscale(range(1(1)4)))

*Note additional formatting requires the "SA Figure Satisfaction with Democracy-Republicans.grec" file with the command graph play "SA Figure Satisfaction with Democracy-Republicans.grec"

graph twoway (histogram revdemqual if independent==1 & panel==1, by(wave) discrete percent ytitle("Percent") xlabel(1 "not at all satisfied" 2 "not very satisfied" 3 "somewhat satisfied" 4 "very satisfied") xscale(range(1(1)4)))

*Note additional formatting requires the "SA Figure Satisfaction with Democracy-Independents.grec" file with the command graph play "SA Figure Satisfaction with Democracy-Independents.grec"

*Figure. Changes in Satisfaction with Elections (Pre/Post-Election)

cibar revdemelect if partyid<4 & panel==1, over1(wave) over2(partyid) graphopts(title("Changes in Satisfaction with U.S. Elections (Pre/Post Election)", size(medium)) ytitle("mean satisfaction") legend(order(1 2) label(1 "Pre-Election") label(2 "Post-Election")))

*Satisfaction with Elections – Democrats, Republicans, Independents

graph twoway (histogram revdemelect if panel==1 & partyid<4, by(partyid wave) discrete percent)

*Note additional formatting requires the "SA Figure Satisfaction with Elections.grec" file with the command graph play "SA Figure Satisfaction with Elections.grec"

*Figure. Changes in Beliefs that US Elections are Free and Fair (Pre/Post-Election)

cibar revfreefair if partyid<4 & panel==1, over1(wave) over2(partyid) graphopts(title("Changes in Belief that US Elections are Free/Fair (Pre/Post Election)", size(medium)) ytitle("mean response on Free and Fair Elections") legend(order(1 2) label(1 "Pre-Election") label(2 "Post-Election")))

*Beliefs that US Elections are Free and Fair – Democrats, Republicans, Independents

graph twoway (histogram revfreefair if panel==1 & partyid<4, by(partyid wave) discrete percent)

*Note additional formatting requires the "SA Figure Elections Free and Fair.grec" file with the command graph play "SA Figure Elections Free and Fair.grec"

*Figure. Changes in Satisfaction with News Media (Pre/Post-Election)

cibar revdemmedia if partyid<4 & panel==1, over1(wave) over2(partyid) graphopts(title("Change in Satisfaction with News Media (Pre/Post Election)", size(medium)) ytitle("mean satisfaction with news media") legend(order(1 2) label(1 "Pre-Election") label(2 "Post-Election")))

*Satisfaction with News Media – Democrats, Republicans, Independents

graph twoway (histogram revdemmedia if panel==1 & partyid<4, by(partyid wave) discrete percent)

*Note additional formatting requires the "SA Figure Satisfaction with Media.grec" file with the command graph play "SA Figure Satisfaction with Media.grec"

*Figure. Changes in Beliefs about Future Economy Prospects (Pre/Post-Election)

cibar futureeconomy if partyid<4 & panel==1, over1(wave) over2(partyid) graphopts(title("Change in Beliefs about Future Economic Prospects (Pre/Post Election)", size(medium)) ytitle("mean of future economic prospects") legend(order(1 2) label(1 "Pre-Election") label(2 "Post-Election")))

*Beliefs about Future Economy Prospects – Democrats, Republicans, Independents

graph twoway (histogram futureeconomy if panel==1 & partyid<4, by(partyid wave) discrete percent)

*Note additional formatting requires the " SA Figure Beliefs about Future Economy.grec" file with the command graph play "SA Figure Beliefs about Future Economy.grec"

*Figure. Changes in Beliefs about Future Income Prospects (Pre/Post-Election)

cibar futureincome if partyid<4 & panel==1, over1(wave) over2(partyid) graphopts(title("Change in Future Income Prospects (Pre/Post Election)", size(medium)) ytitle("mean of future income prospects") legend(order(1 2) label(1 "Pre-Election") label(2 "Post-Election")))

*Beliefs about Future Income Prospects – Democrats, Republicans, Independents

graph twoway (histogram futureincome if panel==1 & partyid<4, by(partyid wave) discrete percent)

*Note additional formatting requires the " SA Figure Beliefs about Future Income.grec" file with the command graph play "SA Figure Beliefs about Future Income.grec"

*Figure. Changes in Negative Emotional Affect (Pre/Post-Election)

cibar revnegaffect if partyid<4 & panel==1, over1(wave) over2(partyid) graphopts(title("Changes in Negative Emotional Affect (Pre/Post Election)", size(medium)) ytitle("mean of negative affect index") legend(order(1 2) label(1 "Pre-Election") label(2 "Post-Election")))

*Negative Emotional Affect – Democrats, Republicans, Independents

graph twoway (histogram revnegaffect if panel==1 & partyid<4, by(partyid wave) discrete percent)

*Note additional formatting requires the " SA Figure Emotions.grec" file with the command graph play "SA Figure Emotions.grec"

*Summary of Variables from Panel Study and Demographics

sum revdemqual revdemelect revfreefair revdemmedia futureeconomy futureincome revnegaffect i.partyid female ageyr education i.race dlatino dbornusa devangelical income stateunemp dhadcovid dfamcovid ddiedcovid pnew_death pnew_case i.census_region dvoteprimary dvoted2020 alreadyvoted pstatebiden flipped if panel==1 & wave==1

*Manuscript Robustness Checks

*Modeling with Vertical/Horizontal Data Structure (long vs. wide format)

*Table 1 (wide format). Partisan Satisfaction with Democracy and Plausible Mediators (OLS Regression)

*Table 1 (long format). Partisan Satisfaction with Democracy and Plausible Mediators (OLS Regression)

xtset respid

xtreg revdemqual wave##republican wave##democrat if panel==1, fe robust
xtreg futureeconomy wave##republican wave##democrat if panel==1, fe robust
xtreg futureincome wave##republican wave##democrat if panel==1, fe robust
alpha angry afraid sad worried
xtreg revnegaffect wave##republican wave##democrat if panel==1 & sad!=., fe robust
xtreg revdemelect wave##republican wave##democrat if panel==1 & missingelect!=1, fe robust
xtreg revfreefair wave##republican wave##democrat if panel==1, fe robust
xtreg revdemmedia wave##republican wave##democrat if panel==1, fe robust

*Table 2 (wide format). Mediators of the Post-Election Partisan Gap (OLS Regression)

*Table 2 (long-format). Mediators of the Post-Election Partisan Gap (OLS Regression)


xtreg revdemqual wave##republican wave##democrat if panel==1, fe robust
xtreg revdemqual wave##republican wave##democrat futureeconomy futureincome if panel==1, fe robust
xtreg revdemqual wave##republican wave##democrat revnegaffect if panel==1, fe robust
xtreg revdemqual wave##republican wave##democrat revdemelect if panel==1, fe robust
xtreg revdemqual wave##republican wave##democrat revfreefair if panel==1, fe robust
xtreg revdemqual wave##republican wave##democrat revdemmedia if panel==1, fe robust
xtreg revdemqual wave##republican wave##democrat futureeconomy futureincome  revnegaffect revdemelect revfreefair revdemmedia if panel==1, fe robust

*Table 2 (long-format). Mediators of the Post-Election Partisan Gap (OLS Regression, clustered SEs)

xtreg revdemqual wave##republican wave##democrat if panel==1, fe cluster(respid)
xtreg revdemqual wave##republican wave##democrat if panel==1, fe cluster(state)


*Ordered Probit Estimation (Wide Format)

*Table 1 (wide format). Partisan Satisfaction with Democracy and Plausible Mediators (Ordered Probit Regression)

*Table 2 (wide format). Mediators of the Post-Election Partisan Gap (Ordered Probit Regression)

*Table 2 (long format). Post-Election Partisan Gap (Ordered Probit Regression, clustered SEs)

oprobit revdemqual wave##republican wave##democrat if panel==1, cluster(respid)
reg revdemqual wave##republican wave##democrat if panel==1,  cluster(respid)

*Table 2 (long format). Mediators of the Post-Election Partisan Gap (Ordered Probit Regression)

oprobit revdemqual wave##republican wave##democrat revdemelect revfreefair revdemmedia if panel==1, cluster(respid)
reg revdemqual wave##republican wave##democrat revdemelect revfreefair revdemmedia if panel==1,  cluster(respid)

*Table 2 (long format). Mediators of the Post-Election Partisan Gap (Ordered Probit Regression)

oprobit revdemqual wave##republican wave##democrat revdemelect if panel==1, cluster(respid)
oprobit revdemqual wave##republican wave##democrat  revfreefair if panel==1, cluster(respid)
oprobit revdemqual wave##republican wave##democrat revdemmedia if panel==1, cluster(respid)

*Formal Mediation Analysis

*Mediation Analysis of Proposed Institutional Mediators/Moderators of Election Effects

*Note: may require installation of medeff and medsens commands using  st0243.pkg from http://www.stata-journal.com/software/sj11-4/

findit medeff

medeff (regress revdemelect wave) (regress revdemqual wave revdemelect ) if republican==1 & panel==1, mediate(revdemelect) treat(wave) sims(1000)
medsens (regress revdemelect wave) (regress revdemqual revdemelect wave) if republican==1 & panel==1, mediate(revdemelect) treat(wave)

medeff (regress revdemelect wave) (regress revdemqual wave revdemelect ) if democrat==1 & panel==1, mediate(revdemelect) treat(wave) sims(1000)
medsens (regress revdemelect wave) (regress revdemqual revdemelect wave) if democrat==1 & panel==1, mediate(revdemelect) treat(wave)

medeff (regress revfreefair wave) (regress revdemqual wave revfreefair ) if republican==1 & panel==1, mediate(revfreefair) treat(wave) sims(1000)
medsens (regress revfreefair wave) (regress revdemqual revfreefair wave) if republican==1 & panel==1, mediate(revfreefair) treat(wave)

medeff (regress revfreefair wave) (regress revdemqual wave revfreefair ) if democrat==1 & panel==1, mediate(revfreefair) treat(wave) sims(1000)
medsens (regress revfreefair wave) (regress revdemqual revfreefair wave) if democrat==1 & panel==1, mediate(revfreefair) treat(wave)

medeff (regress revdemmedia wave) (regress revdemqual wave revdemmedia ) if republican==1 & panel==1, mediate(revdemmedia) treat(wave) sims(1000)
medsens (regress revdemmedia wave) (regress revdemqual revdemmedia wave) if republican==1 & panel==1, mediate(revdemmedia) treat(wave)

medeff (regress revdemmedia wave) (regress revdemqual wave revdemmedia ) if democrat==1 & panel==1, mediate(revdemmedia) treat(wave) sims(1000)
medsens (regress revdemmedia wave) (regress revdemqual revdemmedia wave) if democrat==1 & panel==1, mediate(revdemmedia) treat(wave)

*Figure – Total Effect that is Mediated - See file in excel “MS. Figure 3” in “Elections and Democracy All Excel Files.xls”

*Mediation Analysis with Generalized Structural Equation Modeling (GSEM)

*GSEM Models

*Direct Effects

gsem (wave -> revdemqual, ) (democrat -> revdemqual, ) (republican -> revdemqual, ) (1.democrat#2.wave -> revdemqual, ) (1.republican#2.wave -> revdemqual, ) if panel==1, vce(cluster respid) nocapslatent

*Indirect Effects

gsem (revfreefair -> revdemqual, ) (revdemelect -> revdemqual, ) (revdemmedia -> revdemqual, ) (wave -> revfreefair, ) (wave -> revdemelect, ) (wave -> revdemmedia, ) (democrat -> revfreefair, ) (democrat -> revdemelect, ) (democrat -> revdemmedia, ) (republican -> revfreefair, ) (republican -> revdemelect, ) (republican -> revdemmedia, ) (1.democrat#2.wave -> revfreefair, ) (1.democrat#2.wave -> revdemelect, ) (1.democrat#2.wave -> revdemmedia, ) (1.republican#2.wave -> revfreefair, ) (1.republican#2.wave -> revdemelect, ) (1.republican#2.wave -> revdemmedia, ) if panel==1, vce(cluster respid) cov( e.revfreefair*e.revdemelect e.revdemmedia*e.revfreefair e.revdemmedia*e.revdemelect) nocapslatent

*Election quality mediator

gsem (revdemelect -> revdemqual, ) (wave -> revdemqual, ) (wave -> revdemelect, ) (democrat -> revdemqual, ) (democrat -> revdemelect, ) (republican -> revdemqual, ) (republican -> revdemelect, ) (1.democrat#2.wave -> revdemqual, ) (1.democrat#2.wave -> revdemelect, ) (1.republican#2.wave -> revdemqual, ) (1.republican#2.wave -> revdemelect, ) if panel==1, vce(cluster respid) nocapslatent

*Free/Fair Mediator

gsem (revfreefair -> revdemqual, ) (wave -> revdemqual, ) (wave -> revfreefair, ) (democrat -> revdemqual, ) (democrat -> revfreefair, ) (republican -> revdemqual, ) (republican -> revfreefair, ) (1.democrat#2.wave -> revdemqual, ) (1.democrat#2.wave -> revfreefair, ) (1.republican#2.wave -> revdemqual, ) (1.republican#2.wave -> revfreefair, ) if panel==1, vce(cluster respid) nocapslatent

*Media Mediator

gsem (revdemmedia -> revdemqual, ) (wave -> revdemqual, ) (wave -> revdemmedia, ) (democrat -> revdemqual, ) (democrat -> revdemmedia, ) (republican -> revdemqual, ) (republican -> revdemmedia, ) (1.democrat#2.wave -> revdemqual, ) (1.democrat#2.wave -> revdemmedia, ) (1.republican#2.wave -> revdemqual, ) (1.republican#2.wave -> revdemmedia, ) if panel==1, vce(cluster respid) nocapslatent

*Direct and Indirect Effects

gsem (revfreefair -> revdemqual, ) (revdemelect -> revdemqual, ) (revdemmedia -> revdemqual, ) (wave -> revdemqual, ) (wave -> revfreefair, ) (wave -> revdemelect, ) (wave -> revdemmedia, ) (democrat -> revdemqual, ) (democrat -> revfreefair, ) (democrat -> revdemelect, ) (democrat -> revdemmedia, ) (republican -> revdemqual, ) (republican -> revfreefair, ) (republican -> revdemelect, ) (republican -> revdemmedia, ) (1.democrat#2.wave -> revdemqual, ) (1.democrat#2.wave -> revfreefair, ) (1.democrat#2.wave -> revdemelect, ) (1.democrat#2.wave -> revdemmedia, ) (1.republican#2.wave -> revdemqual, ) (1.republican#2.wave -> revfreefair, ) (1.republican#2.wave -> revdemelect, ) (1.republican#2.wave -> revdemmedia, ) if panel==1, vce(cluster respid) cov( e.revfreefair*e.revdemelect e.revfreefair*e.revdemmedia e.revdemelect*e.revdemmedia) nocapslatent

*Goodness of Fit

sem (revfreefair -> revdemqual, ) (revdemelect -> revdemqual, ) (revdemmedia -> revdemqual, ) (wave -> revdemqual, ) (wave -> revfreefair, ) (wave -> revdemelect, ) (wave -> revdemmedia, ) (democrat -> revdemqual, ) (democrat -> revfreefair, ) (democrat -> revdemelect, ) (democrat -> revdemmedia, ) (republican -> revdemqual, ) (republican -> revfreefair, ) (republican -> revdemelect, ) (republican -> revdemmedia, ) if panel==1, vce(cluster respid) nocapslatent

estat residuals

*COVID19 and Satisfaction with Democracy

logit dhadcovid wave republican democrat if panel==1, robust
logit dfamcovid wave republican democrat if panel==1, robust
logit ddiedcovid wave republican democrat if panel==1, robust

*“The average percent increase in cases by state in October was 91.4% (SD = 145.0), rising to 172.9% (SD=383) in November. The average percentage increase in deaths by state in October was 1.5% (SD = 3.72) and 1.6% (SD =4.98) in November.”

*Use dataset covidcdcdata.dta

*Covid Effects on Satisfaction with Democracy (OLS Regression)

xtreg revdemqual wave##republican wave##democrat dhadcovid dfamcovid ddiedcovid pnew_case pnew_death if panel==1, fe robust

*Economic Indicators and Satisfaction with Democracy

tab hhincome
tab income
tab covidincome

*The modal response is “somewhat concerned” and Democrats on average were more concerned than Republicans or Independents before the election (two-sample t-test = 3.26, p<0.0006).

ttest revcovidincome if panel==1 & wave==1, by(democrat)

xtreg revdemqual wave##republican wave##democrat wave##c.hhincome income revcovidincome stateunemp if panel==1, fe robust

*Emotional Affect and Satisfaction with Democracy 

*“Factor analysis confirms that responses to these items line up on a single dimension, and we thus combine negative affective responses into a common index measuring latent negative affect (Factor 1 Eigenvalue = 2.87, Cronbach’s alpha = 0.92)”

factor angry sad afraid worried
alpha angry sad afraid worried
*use “gen(negaffect)” after alpha command to create index

*Changes in Emotional Affect after the Election (OLS Regression)

xtreg revnegaffect wave##republican wave##democrat if panel==1, fe robust
xtreg revhappy wave##republican wave##democrat if panel==1, fe robust
xtreg revproud wave##republican wave##democrat if panel==1, fe robust
xtreg revdemqual wave##republican wave##democrat revnegaffect if panel==1, fe robust
xtreg revdemqual wave##republican wave##democrat revhappy revproud if panel==1, fe robust

*The News Media and Democratic Satisfaction

xtreg revdemqual wave##republican wave##democrat if panel==1, fe robust
xtreg revdemqual wave##republican wave##democrat revdemmedia if panel==1, fe robust
xtreg revdemmedia wave##republican wave##democrat if panel==1, fe robust
xtreg revdemmedia wave##republican wave##democrat trustmedia if panel==1, fe robust

*Voting Effects on Democratic Satisfaction

*“Within the panel, 41% voted early by mail, 26% voted in person before election day, and 34% voted in person on election day.”

tab votemethod if panel==1

xtreg revdemqual wave##republican wave##democrat wave##dvoted2020 if panel==1, fe robust
xtreg revdemqual wave##republican wave##democrat wave##i.votemethod if panel==1, fe robust
xtreg revdemqual wave##republican wave##democrat wave##c.pstatebiden if panel==1, fe robust
xtreg revdemqual wave##republican wave##democrat wave##flipped if panel==1, fe robust

*Trump Voters vs Biden Voters on Democratic Satisfaction

*“In direct questions, 60.7% of our sample indicated that they voted for Biden, 36.4% for Trump, and <3% for someone else.”

tab whovote2020 if wave==2 & panel==1

*Difference in means estimation (Tsai 2019) indicates that 40% of respondents in the survey chose Trump in the 2020 election, compared to 36.4% of the sample when using the direct item.

kict ls listexp if panel==1 & wave==2, nnonkey(5) condition(listgroup) estimator(linear)

*“When we compare the direct results, based on party ID, we find that 94% of voting Democrats say directly that they selected Biden, while 5.5% voted for Trump. Among voting Republicans, 81% say they chose Trump and 17% selected Biden. Lastly, among Independents who voted, 55% chose Biden and 36% selected Trump.” 

tab whovote2020 if wave==2 & panel==1 & democrat==1
tab whovote2020 if wave==2 & panel==1 & republican==1
tab whovote2020 if wave==2 & panel==1 & independent==1

*“We now examine data from the list experiment. Based on the overall results of the list experiment, we predict that 42% of Independents (compared to 36% when using the direct measure) voted for Trump. Among Democrats, the list experiment predicts that essentially no Democrats voted for Trump (0.42 - 0.48), and essentially all Republicans (0.42 + 0.54) voted for Trump.”

*Note: May require installation of package st0559 from http://www.stata-journal.com/software/sj19-2

findit kict

kict ls listexp republican democrat  if panel==1 & wave==2, nnonkey(5) condition(listgroup) estimator(linear)

*Satisfaction with Democracy by Vote Choice (OLS Regression)

xtreg revdemqual wave##republican wave##democrat if panel==1, fe robust
xtreg revdemqual  wave##i.whovote2020 if panel==1, fe robust

*Satisfaction with Democracy Changes among Crossover Voters

*“Among respondents in our panel study who voted, 17% of Republicans indicated that they voted for Joe Biden and 6% of Democrats voted for Donald Trump. Few respondents (1 Democrat and 3 Republicans) voted for someone else.”

tab whovote2020 if wave==2 & panel==1 & democrat==1
tab whovote2020 if wave==2 & panel==1 & republican==1

*Satisfaction with Democracy and Crossover Voters (OLS Regression)

xtreg revdemqual  wave##ib3.whovote2020##partyid if panel==1 & partyid<4 & whovote2020<3, fe robust

*Democratic Satisfaction and Candidate Evaluations

cibar trumptherm if panel==1 & partyid<4, over2(partyid) over1(wave) graphopts(title("Mean Trump Thermometer Scores", size(medium)) ytitle("mean of trumptherm") legend(order(1 2) label(1 "Pre-Election") label(2 "Post-Election")))
cibar bidentherm if panel==1 & partyid<4, over2(partyid) over1(wave) graphopts(title("Mean Biden Thermometer Scores", size(medium)) ytitle("mean of bidentherm") legend(order(1 2) label(1 "Pre-Election") label(2 "Post-Election")))

*Satisfaction with Democracy and Candidate Evaluations (OLS Regression)

xtreg revdemqual wave##republican wave##democrat trumptherm if panel==1, fe robust 
xtreg revdemqual wave##republican wave##democrat bidentherm if panel==1, fe robust 
xtreg revdemqual wave##republican wave##democrat trumptherm bidentherm if panel==1, fe robust

*Democratic Satisfaction and Beliefs about Republican Victory

*“The first figure below shows that the vast majority of Republicans and Democrats in the panel (85% vs 91%) unsurprisingly anticipated ahead of the election that their candidate would win; Independents were split but disproportionately expected Biden to prevail.”

tab whowin2020 if republican==1 & panel==1 & wave==1
tab whowin2020 if democrat==1 & panel==1 & wave==1
tab whowin2020 if independent==1 & panel==1 & wave==1

twoway(histogram whowin2020 [] if partyid<4, ytitle(`"Percent"') xtitle(`"Wav1_PREELECT Who will be elected president in November? - Selected Choice"') legend(cols(1)) barwidth(-99) plotregion(margin(b=0))  by(partyid,  ) legend(nodraw) percent start(.5) width(1)  )   (histogram whowin2020 [] if partyid<4, percent start(.5) width(1)  recastas(scatter) msymbol(none) mlabel(_height) mlabposition(12)  ) if __000000 ||  ||

*Note additional formatting requires the " SA Figure Who Will Win.grec" file with the command graph play "SA Figure Who Will Win.grec"

*The second figure shows that, after the election (the panel was conducted Nov 10-23, when the election has been called for Biden by the Associated Press), a majority of Republicans (59%) and many Independents (26%) still believed that Trump ultimately would be reelected.”

tab whowin2020_post if republican==1 & panel==1 & wave==2
tab whowin2020_post if independent==1 & panel==1 & wave==2

twoway(histogram whowin2020_post [] if partyid<4, ytitle(`"Percent"') xtitle(`"Wav1_PREELECT Who will be elected president in November? - Selected Choice"') legend(cols(1)) barwidth(-99) plotregion(margin(b=0))  by(partyid,  ) legend(nodraw) percent start(.5) width(1)  )   (histogram whowin2020_post [] if partyid<4, percent start(.5) width(1)  recastas(scatter) msymbol(none) mlabel(_height) mlabposition(12)  ) if __000000 ||  ||

*Note additional formatting requires the " SA Figure Who Won.grec" file with the command graph play "SA Figure Who Won.grec"

*Democratic Satisfaction and Beliefs about Biden Victory (OLS Regression)

xtreg revdemqual wave##republican wave##democrat if panel==1, fe robust
xtreg revdemqual wave##republican wave##democrat wave##i.whowin2020 if panel==1 & whowin2020<3, fe robust
xtreg revdemqual wave##republican wave##democrat wave##i.whowin2020_post if panel==1 & whowin2020_post<3, fe robust
xtreg revdemqual wave##republican wave##democrat wave##i.whowin2020_post revdemelect revfreefair revdemmedia if panel==1 & whowin2020_post<3, fe robust

*Democratic Satisfaction among Independent Leaners

*“Approximately 25% of our sample respondents identify as Independents. The survey included a follow-up item asking “Independent” and otherwise unaffiliated respondents if they leaned more toward the Democratic Party (18%), the Republican Party (25%), or neither (57%).”

tab independent if panel==1
tab indleaner if panel==1

*Democratic Satisfaction among Independent Leaners (OLS Regression)

xtreg revdemqual wave##ib3.indleaner if panel==1, fe robust

*Democratic Satisfaction (Longitudinal vs. Panel Sample)

*Democracy Satisfaction Among Panel Data Respondents (OLS Regression)

xtreg revdemqual wave##republican wave##democrat if panel==1, fe robust
xtreg revdemqual wave##republican wave##democrat revdemelect revfreefair revdemmedia if panel==1, fe robust

*Democracy Satisfaction Pre/Post Election, all respondents (OLS Regression)

reg revdemqual wave##republican wave##democrat , robust
vif
reg revdemqual wave##republican wave##democrat panel female ageyr education ib2.race dlatino dbornusa devangelical income stateunemp dhadcovid dfamcovid ddiedcovid pnew_case pnew_death i.census_region dvoteprimary ib8.votelikely pstatebiden flipped, robust
vif
reg revdemqual wave##republican wave##democrat revdemelect revfreefair revdemmedia panel female ageyr education ib2.race dlatino dbornusa devangelical income stateunemp dhadcovid dfamcovid ddiedcovid pnew_case pnew_death i.census_region dvoteprimary ib8.votelikely pstatebiden flipped, robust
vif

*Panel Data Attrition Analysis

*Analysis of Panel Attrition vs. Non-Attrition (Logit Regression)

tab attrition if wave==1
logit attrition female ageyr education income i.partyid devangelical i.race dbornusa dlatino   dhadcovid dfamcovid ddiedcovid i.census_region dvoteprimary ib8.votelikely if wave==1, robust

*Balance Tests for Panel Attrition

ksmirnov female if wave==1, by(attrition)
ksmirnov ageyr if wave==1, by(attrition)
ksmirnov education if wave==1, by(attrition)
ksmirnov income if wave==1, by(attrition)
ksmirnov partyid if wave==1, by(attrition)
ksmirnov devangelical if wave==1, by(attrition)
ksmirnov race if wave==1, by(attrition)
ksmirnov dlatino if wave==1, by(attrition)
ksmirnov dbornusa if wave==1, by(attrition)
ksmirnov dhadcovid if wave==1, by(attrition)
ksmirnov dfamcovid if wave==1, by(attrition)
ksmirnov ddiedcovid if wave==1, by(attrition)
ksmirnov census_region if wave==1, by(attrition)
ksmirnov dvoteprimary if wave==1, by(attrition)
ksmirnov votelikely if wave==1, by(attrition)

*Democracy Satisfaction and Attrition on Observables (OLS Regression)

reg revdemqual panel if wave==1, robust
reg revdemqual ageyr income devangelical i.race ib8.votelikely if wave==1, robust
reg revdemqual panel ageyr income devangelical i.race ib8.votelikely if wave==1, robust

*Change in Satisfaction with Democracy Among Evangelicals and Likely Voters (OLS Regression)

xtreg revdemqual wave##republican wave##democrat if panel==1, fe robust 
xtreg revdemqual wave##republican wave##democrat wave##devangelical if panel==1, fe robust
xtreg revdemqual wave##republican wave##democrat wave##ib8.votelikely if panel==1, fe robust

*Representation of Voters vs. Non-Voters in the Panel

*“In the summary statistics below, we report that when we ask panel respondents (N=504) after the election whether they had voted, 89% indicated that they had and 11% did not.”

tab dvoted2020 if panel==1 & wave==2

*“In the pre-election wave of 955 respondents, we asked them if they were planning to vote in the election and if so, how? 442 (46%) indicated that they had already voted at the time of the study.” 

tab votelikely if wave==1

*"Of the remaining 513, 83% also indicated that they were extremely likely to vote before or on election day, while roughly 11% indicated that they were unlikely to vote with 6% unsure.”

tab likelyvoter if wave==1

*Probability of having Voting (Post-Election Panel, Logit Regression)

logit dvoted2020 i.partyid female ageyr education income  i.race devangelical dbornusa dlatino  i.census_region if wave==2, robust

*Summary Demographics for Panel, Wave 1, Wave 2, and Pooled Samples

*Panel Data

sum revdemqual revdemelect revfreefair revdemmedia futureeconomy futureincome revnegaffect i.partyid female ageyr education i.race dlatino dbornusa devangelical income stateunemp dhadcovid dfamcovid ddiedcovid pnew_death pnew_case i.census_region dvoteprimary dvoted2020 alreadyvoted pstatebiden flipped if panel==1 & wave==1

*Wave 1 Full Sample (Panel + non-panel)

sum revdemqual revdemelect revfreefair revdemmedia futureeconomy futureincome revnegaffect i.partyid female ageyr education i.race dlatino dbornusa devangelical income stateunemp dhadcovid dfamcovid ddiedcovid pnew_death pnew_case i.census_region dvoteprimary alreadyvoted pstatebiden flipped panel if wave==1 & revdemqual~=.

*Wave 2 Full sample (Panel + non-panel)

sum revdemqual revdemelect revfreefair revdemmedia futureeconomy futureincome revnegaffect i.partyid female ageyr education i.race dlatino dbornusa devangelical income stateunemp dhadcovid dfamcovid ddiedcovid pnew_death pnew_case i.census_region dvoteprimary alreadyvoted pstatebiden flipped panel if wave==2 & revdemqual~=.

*Pooled Data

sum revdemqual revdemelect revfreefair revdemmedia futureeconomy futureincome revnegaffect i.partyid female ageyr education i.race dlatino dbornusa devangelical income stateunemp dhadcovid dfamcovid ddiedcovid pnew_death pnew_case i.census_region dvoteprimary alreadyvoted pstatebiden flipped wave panel if revdemqual~=.

log close
